<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* body{
            width: 2000px;
            height: 2000px;
        } */
    </style>
  </head>
  <body>
    <button id="btn">跳转到B页面</button>
    <button onclick="jump()">返回</button>
    <button onclick="location.reload()">刷新</button>

    <script>
        //   console.log(innerHeight)
        //   console.log(innerWidth)
        //   console.log(document.documentElement.clientHeight)
        //   console.log(document.documentElement.clientWidth)
        //   //确认年龄，返回布尔值
        //   var age = confirm('输入年龄')
        //   console.log(age)

        //   document.getElementById('btn').onclick = function () {
        //     location.href = './b.html';
        //   };

        //判断用户的使用设备
        function isWindow() {
          var userAgent = navigator.userAgent.toLowerCase();
          var isMobile = userAgent.indexOf('android') ;
          var isIpad = userAgent.indexOf('ipd') ;
          var isIphone = userAgent.indexOf('iphone') ;
          //当用户设备是移动，iPad，iPhone时，返回false
      //     if (!isMobile && !isIpad && !isIphone) {
      //       return false;
      //     }
      //     return true;
      //   }
      //   console.log(isWindow())
            
    </script>
  </body>
</html>
